cc_library(
    name = "cpptrace",
    srcs = glob([
        "src/**/*.hpp",
        "src/**/*.cpp",
    ]),
    local_defines = [
        "CPPTRACE_GET_SYMBOLS_WITH_LIBDWARF",
        "CPPTRACE_DEMANGLE_WITH_CXXABI",
        "CPPTRACE_UNWIND_WITH_LIBUNWIND"
    ],
    hdrs = glob([
        "include/cpptrace/*.hpp",
        "include/ctrace/*.h",
    ]),
    includes = [
        "include",
        "src"
    ],
    deps = [
        "@libdwarf//:libdwarf",
        "@libunwind//:libunwind"
    ],
    copts = [
        "-Wall",
        "-Wextra",
        "-Werror=return-type",
        "-Wundef",
        "-Wuninitialized",
        "-fPIC",
        "-std=c++11"
    ],
    visibility = ["//visibility:public"],
)
